package com.imooc.spring.ioc.class011;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

/*
public class Bean {
    public void onInit() {
        System.out.println("Bean.onInit");
    }
    public void onDestroy() {
        System.out.println("Bean.onDestroy");
    }
}
*/
public class Bean implements InitializingBean, DisposableBean {
    public void onInit() {
        System.out.println("Bean.onInit");
    }
    public void onDestroy() {
        System.out.println("Bean.onDestroy");
    }
    @Override
    public void destroy() throws Exception {
        System.out.println("Bean.destroy");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("Bean.afterPropertiesSet");
    }
}